{*
 * This file is part of the Agora distribution. 
 * Detailed copyright and licensing information can be found
 * in the gpl-3.0.txt file which should be included in the distribution.
 * 
 * @version		$Id: 3.0.14 Olympus 2010-09-28 rammstein4o $
 * @copyright  2007 - 2010 jVitals
 * @license   GPLv3 Open Source
 * @link       http://jvitals.com
 * @since      File available since initial release
 *}
{style href="style/`$agora_config.o_default_style`/common.css"}
{style href="style/`$agora_config.o_default_style`/index.css"}

<div class="ag_agora"> {* Fix for "move topic" function *}

	<div class="ag_rightend">
		<h2 class="ag_headerbar"><span class="ag_middle">##Select forum##</span></h2>
	</div>
	
	<form method="post" action="{$url}" onsubmit="return false;">
	<div class="ag_outerwrap">
			<fieldset class="ag_inform">
				<legend class="ag_color">##Select forum##</legend>
				<div class="ag_infldset">
					<select name="id" id="forum_select_id" class="ag_qjump">
						{foreach from=$writable_forums item=forum_cat}
							{if !empty($forum_cat.forums)}
						<optgroup label="{$forum_cat.cat_name}">
							{foreach from=$forum_cat.forums item=forum_forum}
								{if !$forum_forum.closed}
									<option value="{$forum_forum.id}">
										|--{section name=forum_level start=0 loop=$forum_forum.level*2}-{/section}&nbsp;{$forum_forum.forum_name}
									</option>
								{/if}
							{/foreach}
						</optgroup>
							{/if}
						{/foreach}
					</select>
				</div>
			</fieldset>
			<div class="ag_postbuttons">
				<span>
					<input class="ag_button ag_btn_submit" type="submit" name="submit" value="##Submit##" title="##Submit##" onclick="agora_merge_step2();return false;" accesskey="g" />
					{if $smarty.get.action == split
					 || $smarty.get.action == move
					 || $smarty.get.action == merge}
					&nbsp;##or##&nbsp;
					<a href="javascript:void(0);" class="ag_btn_goback" title="##Cancel##" onclick="window.parent.document.getElementById('sbox-window').close();">##Cancel##</a>
					{else}
					&nbsp;##or##&nbsp;
					<a href="{url}" class="ag_btn_goback" title="##Go back##">##Go back##</a>
					{/if}
				</span>
			</div>
	</div>

	{foreach name=post_loop from=$posts item=post}
	{include file=agora:include/post_split_row.tpl post_num=$post.post_number post_num_on_page=$smarty.foreach.post_loop.iteration}
	{/foreach}
	</form>
</div>  {* Fix for "move topic" function *}